package Network;

import java.net.ServerSocket;
import java.net.Socket;

import Context.Constant;
import Context.ContextHolder;


public class FileSendDaemonServer extends Thread {

	 ServerSocket severSocket;
	    
	 @Override
	 public void run(){
	     try {
	    	 severSocket= new ServerSocket(Integer.parseInt(
						ContextHolder.getContext().getProperty(Constant.MSG_DEFUALTE_PORT)));
	         
	    	 while (true) {
	             Socket requestSocket = severSocket.accept();
	             new Thread(new FileSendThread(requestSocket)).start();
	         }
	     } catch (Exception e) {
	     }
	 }
}
